package gov.fgn.sijyp.integracion.origen;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the relacionpostuladoversion database
 * table.
 */
@Embeddable
public class RelacionPostuladoVersionPK implements Serializable {
  // default serial version id, required for serializable classes.
  private static final long serialVersionUID = 1L;

  @Column(unique = true, nullable = false)
  private Integer idVersion;

  @Column(unique = true, nullable = false, length = 21)
  private String radicado;

  public RelacionPostuladoVersionPK() {
  }

  public Integer getIdVersion() {
    return this.idVersion;
  }

  public void setIdVersion(Integer idversion) {
    this.idVersion = idversion;
  }

  public String getRadicado() {
    return this.radicado;
  }

  public void setRadicado(String radicado) {
    this.radicado = radicado;
  }

  public boolean equals(Object other) {
    if (this == other) {
      return true;
    }
    if (!(other instanceof RelacionPostuladoVersionPK)) {
      return false;
    }
    RelacionPostuladoVersionPK castOther = (RelacionPostuladoVersionPK) other;
    return this.idVersion.equals(castOther.idVersion) && this.radicado.equals(castOther.radicado);
  }

  public int hashCode() {
    final int prime = 31;
    int hash = 17;
    hash = hash * prime + this.idVersion.hashCode();
    hash = hash * prime + this.radicado.hashCode();

    return hash;
  }
}